package org.ims.inv.service.project;

import java.util.List;

import org.ims.inv.model.project.ModelProject;

import cn.trymore.core.exception.ServiceException;
import cn.trymore.core.service.ServiceGeneric;
import cn.trymore.core.web.paging.PaginationSupport;
import cn.trymore.core.web.paging.PagingBean;

/**
 * Service: 项目
 * 
 * @author Jeccy.Zhao
 *
 */
public interface ServiceProject
extends ServiceGeneric<ModelProject>
{
	
	/**
	 * Obtains list of entities by criterion
	 * 
	 * @param entity
	 * @return
	 * @throws ServiceException
	 */
	List<ModelProject> getProjectsByCriterion (
			ModelProject entity) throws ServiceException;
	
	/**
	 * Obtains pagination of unappropriated projects
	 * 
	 * @param entity
	 * @param pagingBean
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelProject> getUnAppropriatedProjects (
			ModelProject entity, PagingBean pagingBean) throws ServiceException;
	
	/**
	 * Obtains pagination of first trail projects
	 * 
	 * @param entity
	 * @param pagingBean
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelProject> getFirstTrialProjects (
			ModelProject entity, PagingBean pagingBean) throws ServiceException;
	
	/**
	 * Obtains pagination of re-trail projects
	 * 
	 * @param entity
	 * @param pagingBean
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelProject> getRetrialProjects (
			ModelProject entity, PagingBean pagingBean) throws ServiceException;
	
	/**
	 * Obtains pagination of projects by archive status
	 * 
	 * @param entity
	 * @param status
	 * @param visible
	 * @param pagingBean
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelProject> getProjectsByArchiveStatus (
			ModelProject entity, String status, Integer visible, PagingBean pagingBean) throws ServiceException;
	
}
